<template>
  <div v-if="show">
    <h1>我是模态框</h1>
    <div>模态框的内容</div>
    <button @click="onClose">点击关闭</button>
  </div>
</template>

<script>
export default {
  props: {
    show: {
      type: Boolean,
    },
  },
  methods: {
    onClose() {
      this.$emit("bb", false);
    },
  },
};
</script>

<style></style>
